#include "widget.h"
#include "ui_widget.h"
#include <QRadioButton>
#include <QDebug>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
//    ui->radioButton_other->setEnabled(false);
    ui->radioButton_other->setCheckable(false);

    ui->radioButto_male->setChecked(true);
    ui->label->setText("您选择的性别是：男");
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_radioButto_male_clicked()
{
    ui->label->setText("您选择的性别是：男");
}

void Widget::on_radioButton_female_clicked()
{
    ui->label->setText("您选择的性别是：女");
}

void Widget::on_radioButton_other_clicked()
{
    ui->label->setText("您选择的性别是：其他");
}

void Widget::on_radioButton_clicked()
{
    qDebug() << "clicked";
}

void Widget::on_radioButton_2_pressed()
{
    qDebug() << "pressed";
}

void Widget::on_radioButton_4_released()
{
    qDebug() << "released";
}

void Widget::on_radioButton_3_toggled(bool checked)
{
    qDebug() << "toggled checked = " << checked;
}
